package com.baizhi.springbootshiro.config;

import com.baizhi.springbootshiro.utils.ContextBeanUtils;
import com.baizhi.springbootshiro.utils.JedisUtils;
import org.apache.shiro.cache.Cache;
import org.apache.shiro.cache.CacheException;
import org.apache.shiro.cache.CacheManager;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.stereotype.Component;

/**
 * shiro cache
 *
 * @author Administrator
 */
public class RedisCacheManager implements CacheManager {
    @Override
    public <K, V> Cache<K, V> getCache(String cacheName) throws CacheException {
        //Key
        return new CustomerShiroCache(cacheName);
    }
}
